package com.kaishengit.action;

import com.kaishengit.pojo.Contact;
import com.kaishengit.service.DealContactService;
import com.opensymphony.xwork2.ActionSupport;

public class DealContactAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String contactid;
	private String dealid;
	private DealContactService dealContactService;
	private Contact contact;
	
	public String execute(){
		return SUCCESS;
	}
	
	public String add(){
		contact = dealContactService.save(dealid,contactid);
		return SUCCESS;
		
	}
	//删除与交易相关联的人
	public String delAboutContact(){
		
		dealContactService.del(contactid,dealid);
		return SUCCESS;
	}
	
	//set get
	public String getContactid() {
		return contactid;
	}

	public void setContactid(String contactid) {
		this.contactid = contactid;
	}

	public String getDealid() {
		return dealid;
	}

	public void setDealid(String dealid) {
		this.dealid = dealid;
	}

	public void setDealContactService(DealContactService dealContactService) {
		this.dealContactService = dealContactService;
	}

	public Contact getContact() {
		return contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}
	
}
